<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Yii::$app->name;?> 后台管理</title>
<?php $this->HeaderView(['slide']);?>
</head>
<body class="view_index" id="view_index_Admins">
<div class="padding-0-20">
<table class="view-index-search mb-10" border="0" cellspacing="0" cellpadding="0" width="100%">
<form class="view-index-form" method="get" action="<?php echo $this->createUrl('admin/index');?>" enctype="multipart/form-data">
<input type="hidden" class="input-text" id="YII_CSRF_TOKEN" name="YII_CSRF_TOKEN" value="<?php echo Yii::$app->request->csrfToken;?>">
        <tr>
        <td class="search">
        <div class="div-search" style="margin:0px 0px">
        <span class="ftr"><input type="button" value="添加管理员" class="btn-button-g" onclick="location.href='<?php echo $this->createUrl('admin/create');?>'"></span>
       关键字：<input class="input-text" value="<?php if (isset($_GET['keyword'])) echo $_GET['keyword'];?>" name="keyword" style="width:200px;"/>
        <span class="view-index-batch">
        <input id="submit_search" class="btn-button confirmSubmit" type="submit" value="搜索" name="submit_search" />
        </span></div>
        </td>
        </tr>
</form>
</table>
</div>
<form class="view-index-form mt10" method="post" action="<?php echo $this->createUrl('admin/batch');?>" enctype="multipart/form-data">
<?= base\YiiMobo::csrfToken();?>
<table class="view-index-list" border="0" cellspacing="0" cellpadding="0" width="100%">
    <thead>
        <tr>                            
                          
		        <th width="40" align="left">序号</th> 
                        <th width="80" align="left">用户名</th>
                        <th align="left" width="200">邮箱</th>
                        <th width="160"align="left">注册时间</th>           
            <th width="100" class="edit norightborder">操作</th>
        </tr>
    </thead>
    <tbody>
        <?php
    foreach($models as $k=>$v){
?>
    <tr>
       
        <td><?php echo $v['id'];?></td>      
        <td><?php echo $v['username'];?></td>
        <td><?php echo $v['email'];?></td>  
        <td><?php echo date('Y-m-d H:s:i',$v['created_at']);?></td> 
        
                <td class="td-operation">
             <?php if($v['username'] != 'admin'){?> <a href="<?php echo $this->createUrl(['admin/update','id'=>$v['id']])?>" title="编辑" class="operation-update">编辑</a>
              <a href="<?php echo $this->createUrl('admin/delete',array('id'=>$v['id'],'isdelete'=>$v['status']))?>" title="确认要执行该操作吗？" class="operation-delete"><?php echo $v['status']==0?"锁定":"解锁";?></a><?php }?>
           </td>
       </tr>
   <?php
        }
    ?>
        
 
</tbody>
    
</table>
</form>
<div class="pages">
<?= yii\widgets\LinkPager::widget(['pagination' => $pages]);?>
</div>
<script>
$(function(){

	//添加位置导航文字 请修改
	admin_location('系统管理 > 系统用户管理');
})
</script>
<script type="text/javascript">jQuery(".slideTxtBox").slide({trigger:"click"});</script>
<?php $this->FooterView();?>
</body>
</html>